﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for NumberUtil
/// </summary>
namespace thaihua.utils
{
    public class NumberUtil
    {
        public NumberUtil()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public static decimal? toDecimal(Object obj) 
        {
            try
            {
                return decimal.Parse(obj.ToString());
            }
            catch { }
            return null;
        }
    }
}